package cn.jari.erp.inventory.convert;

import cn.jari.erp.inventory.dto.InventoryCategoryReference;
import cn.jari.erp.inventory.entities.primary.InventoryCategory;
import cn.jari.erp.inventory.dto.UpdateInventoryCategoryCommand;
import cn.jari.erp.inventory.dto.DeleteInventoryCategoryCommand;
import cn.jari.erp.inventory.entities.primary.InventoryItem;
import cn.jari.erp.inventory.dto.DeleteInventoryItemCommand;
import cn.jari.erp.inventory.dto.InventoryCategoryDto;
import cn.jari.erp.inventory.dto.InventoryItemReference;
import cn.jari.erp.inventory.dto.CreateInventoryCategoryCommand;
import cn.jari.erp.inventory.dto.UpdateInventoryItemCommand;
import cn.jari.erp.inventory.dto.InventoryItemDto;
import cn.jari.erp.inventory.dto.CreateInventoryItemCommand;
import com.csicit.ace.appbase.i18n.LocalizeMapper;
import org.mapstruct.Mapper;
import org.mapstruct.Builder;
import org.mapstruct.Mapping;

/*
 * 警告：代码由鲲舟平台生成，请勿手动修改。
 * Warn: This class file is generated by JARI-ACE platform, please do not modify manually。
 */

/**
 * inventory-service的映射定义接口
 *
 * @author JARI-ACE
 */
@Mapper(uses = {MappingObjectFactory.class, LocalizeMapper.class},
        builder = @Builder(disableBuilder = true))
public interface ConvertMapper {
    /**
    * 根据InventoryCategoryReference加载InventoryCategory实体对象
    */
    @Mapping(target = "dataVersion", ignore = true)
    @Mapping(target = "id", ignore = true)
    @Mapping(target = "releaseSource", ignore = true)
    @Mapping(target = "sourceId", ignore = true)
    InventoryCategory map(InventoryCategoryReference dto);
    /**
    * 根据InventoryItemReference加载InventoryItem实体对象
    */
    @Mapping(target = "dataVersion", ignore = true)
    @Mapping(target = "id", ignore = true)
    @Mapping(target = "releaseSource", ignore = true)
    @Mapping(target = "sourceId", ignore = true)
    InventoryItem map(InventoryItemReference dto);
    /**
    * 根据CreateInventoryCategoryCommand加载InventoryCategory实体对象，然后复制属性值到实体对象上
    */
    InventoryCategory map(CreateInventoryCategoryCommand dto);
    /**
    * 根据UpdateInventoryCategoryCommand加载InventoryCategory实体对象，然后复制属性值到实体对象上
    */
    InventoryCategory map(UpdateInventoryCategoryCommand dto);
    /**
    * 根据DeleteInventoryCategoryCommand加载InventoryCategory实体对象，然后复制属性值到实体对象上
    */
    InventoryCategory map(DeleteInventoryCategoryCommand dto);
    /**
    * 根据CreateInventoryItemCommand加载InventoryItem实体对象，然后复制属性值到实体对象上
    */
    InventoryItem map(CreateInventoryItemCommand dto);
    /**
    * 根据UpdateInventoryItemCommand加载InventoryItem实体对象，然后复制属性值到实体对象上
    */
    InventoryItem map(UpdateInventoryItemCommand dto);
    /**
    * 根据DeleteInventoryItemCommand加载InventoryItem实体对象，然后复制属性值到实体对象上
    */
    InventoryItem map(DeleteInventoryItemCommand dto);

    /**
    * 将InventoryCategory转换为InventoryCategoryDto
    */
    InventoryCategoryDto mapToInventoryCategoryDto(InventoryCategory entity);
    /**
    * 将InventoryCategory转换为InventoryCategoryReference
    */
    InventoryCategoryReference mapToInventoryCategoryReference(InventoryCategory entity);
    /**
    * 将InventoryItem转换为InventoryItemReference
    */
    InventoryItemReference mapToInventoryItemReference(InventoryItem entity);
    /**
    * 将InventoryItem转换为InventoryItemDto
    */
    InventoryItemDto mapToInventoryItemDto(InventoryItem entity);
}
